      {% load comments_tags %}
      <h2 id="comments">Comments</h2>
        {% if project %}
        <span id="project_comments_feeds" class="feeds">
            syndicate: 
            <a class="feedlink" href="{% url rss_feeds "comments" %}projects/{{ project.slug}}/" title="rss feed">
                <img class="feedicon" src="{{MEDIA_URL}}images/rss_icon.png" alt="rss icon"/>
            </a>
            <a class="feedlink" href="{% url atom_feeds "comments" %}projects/{{ project.slug}}/" title="atom feed">
                <img class="feedicon" src="{{MEDIA_URL}}images/atom_icon.png" alt="atom icon"/>
            </a>
            {% subscription_link request "pc" project.id%}
            <br/>
        </span>
        {% else %}
        {% if snippet %}
        <span id="snippets_comments_feeds" class="feeds">
            syndicate: 
            <a class="feedlink" href="{% url rss_feeds "comments" %}snippets/{{ object.id}}/" title="rss feed">
                <img class="feedicon" src="{{MEDIA_URL}}images/rss_icon.png" alt="rss icon"/>
            </a>
            <a class="feedlink" href="{% url atom_feeds "comments" %}snippets/{{ object.id}}/" title="atom feed">
                <img class="feedicon" src="{{MEDIA_URL}}images/atom_icon.png" alt="atom icon"/>
            </a>
            {% subscription_link request "sc" %}
            <br/>
        </span>
        {% else %}
        {% if object %}
        <span id="news_comments_feeds" class="feeds">
            syndicate: 
            <a class="feedlink" href="{% url rss_feeds "comments" %}news/{{ object.slug}}/" title="rss feed">
                <img class="feedicon" src="{{MEDIA_URL}}images/rss_icon.png" alt="rss icon"/>
            </a>
            <a class="feedlink" href="{% url atom_feeds "comments" %}news/{{ object.slug}}/" title="atom feed">
                <img class="feedicon" src="{{MEDIA_URL}}images/atom_icon.png" alt="atom icon"/>
            </a>
            {% subscription_link request "nc" object.id %}
            <br/>
        </span>
        {% endif %}
        {% endif %}
        {% endif %}

      
      {% if comments %}
      <div class="comments">
        {% for comment in comments %}
        <div class="comment{% if comment.is_auto_comment %} auto-comment{% endif %}" id="{{comment.short_id}}">
            <div class="comment-header">
              <strong>{{comment.user|userlink}}, {{comment.created|localtime:request}}
              {% if comment.last_editor %}
              - last edit 
              {% ifnotequal comment.user comment.last_editor %}
                by {{comment.last_editor|userlink}}, 
              {% endifnotequal %}
              {{comment.last_edited|localtime:request}}
              {% endif %}
              </strong>
              {% comment_edit_links request comment %}</div> 
            <div class="comment-body">{{comment.raw_content|safe}}</div>
        </div>
        {% endfor %}
       </div>
      {% else %}
         No comments posted yet.
      {% endif %}
      
      {% if comment_form %}
      <h2 id="{{comment_action|lower}}comment">{{comment_action}} comment</h2>
      
      {% if comment_preview %}
      <h3>Preview</h3>
      <div class="preview">
      {% with comment_preview as comment %}
      <div class="comment">
            <div class="comment-header"><strong>{{request.user|userlink}}, just in this moment:</strong></div> 
            <div class="comment-body">{{comment.raw_content|safe}}</div>
        </div>
      </div>
      {% endwith %}
      <h3>Edit</h3>
      {% endif %}
      
      <div class="comment-form">
        <form action="#comments" method="post" class="styled" >
        <table>
        {{comment_form}}
        <tr>
            <td></td>
            <td>
              <input type="submit" name="preview" value="Preview" class="button" />
              <input type="submit" name="submit" value="Submit" class="button" />
            </td>
        </tr>
        </table>
        </form> 
    </div>
      {% else %}
          {% if confirm_delete %}
          <h2 id="confirm">Confirm delete</h2>
          <form action="." method="post" class="styled" >
          <input type="hidden" name="comment_id" value="{{comment_id}}"/>
          Are you sure to delete this comment?
          <input type="submit" name="comment_delete" value="yes" class="button" />
          </form>
          {% else %}
          <p> you need to <a href="{% url auth_login %}">sign in</a> to make a comment</p>
          {% endif %}
      {% endif %}
